<?
$mails = $this->mails;
?>
<div class="content-box">
    <div class="content-box-header">
        <h3>Mail delivery system</h3>
    </div>

    <div class="content-box-content">
        <div class="tab-content default-tab">
            <table>
                <thead>
                <tr>
                    <th>#</th>
                    <th>Title</th>
                    <th>Status</th>
                </tr>
                </thead>
                <tbody>
                <? foreach ($mails as $mail): ?>
                <tr>
                    <td><?= $mail['id'] ?></td>
                    <td><?= $mail['title'] ?></td>
                    <td>
                        <?
                        $status = $mail['status'] ? 'Delivered' : 'Not delivered';
                        echo $status;
                        ?>
                    </td>
                </tr>
                    <? endforeach; ?>
                </tbody>

                <tfoot>
                <tr>
                    <td colspan="3"><a href="/delivery/add" class="button">Add new mail.</a></td>
                </tr>
                </tfoot>
            </table>


        </div>
    </div>
</div>